#!/usr/bin/perl
#######
# minisip build system definitions
#
# These structuers should only be updated when the corresponding packages,
# dependecies, or configuration options have been changed.  If you want
# to customize tehse settings, look at build.local.example.
#


@packages = ( qw(
	 libmutil libmcrypto libmnetutil
	 libmstun libmikey libmsip
	 libminisip milbc libzrtpcpp
	 ministun minisip
	 libminisip-swig
	) );
%dependencies = (
	# core portability and platform libraries
	libmutil => [ ],
	libmnetutil => [ qw( libmutil ) ],
	libmcrypto => [ qw( libmutil libmnetutil ) ],
	libzrtpcpp => [ qw( libmutil libmnetutil libmcrypto ) ],

	# IETF RFC standard libraries
	libmstun => [ qw( libmutil libmnetutil ) ],
	libmikey => [ qw( libmutil libmnetutil libmcrypto ) ],
	libmsip => [ qw( libmutil libmnetutil libmcrypto ) ],

	# libminsip; thar be 'ar kitchen sink, mateys.
	libminisip => [ qw(
		  libmutil libmnetutil libmcrypto 
		  libmstun libmikey libmsip libzrtpcpp
		) ],
	# sound codecs
	milbc => [ qw(
		  libmutil libmnetutil libmcrypto libmikey libmsip libminisip
		) ],

	# applications
	ministun => [ qw( libmutil libmnetutil libmstun ) ],
	minisip => [ qw(
		  libmutil libmnetutil libmcrypto libmikey libmsip libminisip
		) ],
	'libminisip-swig' => [ qw(
		  libmutil libmnetutil libmcrypto libmikey libmsip libminisip
		) ],
);

my %common_params = (
	'maintainer-mode' => 1,
	debug => $debug,
	shared => 1,		# always build shared libraries by default
	static => $static,	# only build static libraries when asked
	'test-suite' => 0,	# enables extended test suites
);
my %libmutil_params = (
	%common_params,
	'color-terminal' => 0,	# enables color output on command line
	memdebug => 0,
	pthread => undef,
);
my %libmcrypto_params = (
	%common_params,
	'fast-aes' => 0,	# enables built-in AES algorithm for testing
	openssl => undef,	# specifies location of openssl files
	gnutls => undef,	# specifies location of gnutls files
	scsim => undef,		# Smart card support based on PCSC lite
);

my %libzrtp_params = (
        %common_params,
);

my %libmnetutil_params = (
	%common_params,
	ipv6 => 1,	# enables IPV6 support
	ldap => undef,	# enables LDAP support
	sctp => undef,	# enables SCTP support
);

my %libmikey_params = (
	%common_params,
	openssl => undef,	# specifies location of openssl files
				# openssl is required for MIKEY PKE.
);

my %libmstun_params = (
	%common_params,
);

# these options are shared between the 'libminisip' and 'minisip' packages
my %common_minisip_params = (
	autocall => 0, 	# enables automatic calling for debug purposes
	opie => 0,	# enables Open Palmtop Integrated Environment support
	ipaq => 0, 	# enables various fixes for the iPAQ
	video => 0, 	# enables video features
);

my %libminisip_params = (
	%common_params,
	%common_minisip_params,
	aec => 0,	# enables automatic echo cancellation features
	alsa => 0,	# enables ALSA sound support
	avcodec => undef,	# specifies location of avcodec
	'avcodec-fixes' => undef,# enables support for new libavcodec abi
	buzzer => 0, 	# enables buzzer support on iPAQ
	dsound => 0,	# enables DirectSound support
	gconf => undef, # enables GConf support
	ipsec => 0,	# enables ipsec support
	ldapcontacts => undef,	# enables contacts via LDAP
	portaudio => undef,	# enables PortAudio V19 support
	p2t => 0,	# enables Push To Talk support
	sdl => 0, 	# enables Simple Drawing Library interface
	zrtp => 0, 	# enables ZRTP support (incomplete!)
	scsim => undef,		# Smart card support based on PCSC lite
);
my %milbc_params = (
	%common_params,
);

my %ministun_params = (
	%common_params,
);

my %minisip_params = (
	%common_params,
	%common_minisip_params,
	gtk => 1,	# enables GTK+ interface
	p2t => 0,	# enables Push To Talk support
	qtui => 0,	# enables Qt interface
	qte => 0,	# enables Qt Embedded interface
	textui => 0,	# enables the text based user interface
);

my %libminisip_swig_params = (
	%common_params,
);

# set the main configure param lookup
%configure_params = (
	libmutil => \%libmutil_params,
	libmcrypto => \%libmcrypto_params,
        libzrtpcpp => \%libzrtp_params,
	libmnetutil => \%libmnetutil_params,

	libmstun => \%libmstun_params,
	libmikey => \%libmikey_params,
	libmsip => \%common_params,

	libminisip => \%libminisip_params,
	milbc => \%milbc_params,

	minisip => \%minisip_params,
	ministun => \%ministun_params,
	'libminisip-swig' => \%libminisip_swig_params,
);

1;
